---
id: installation
title: Installation
---

import { Tabs, Callout } from "nextra/components";

# Installation

There are several ways to install FVM. Choose the method that best fits your development environment.

## Recommendation

We recommend installing the Flutter SDK globally using the official installation guide [here](https://docs.flutter.dev/get-started/install). This will be the main version of Flutter across your machine.

Use FVM to manage the Flutter SDK version for your projects.

You can download the standalone packages from the GitHub repo [here](https://github.com/leoafarias/fvm/releases).

<Tabs items={['macOS', 'Windows', 'Linux', 'Pub']}>
  <Tabs.Tab>
## Install Script (Recommended)

Install the latest version:

```bash
curl -fsSL https://fvm.app/install.sh | bash
```

Install a specific version:

```bash
curl -fsSL https://fvm.app/install.sh | bash -s <version>
```

*Replace `<version>` with your desired FVM version (e.g., `3.2.1`)*

## Homebrew

Install:

```bash
brew tap leoafarias/fvm
brew install fvm
```

Uninstall:

```bash
brew uninstall fvm
brew untap leoafarias/fvm
```

  </Tabs.Tab>
  <Tabs.Tab>

## Chocolatey

Install FVM using Chocolatey from the command line or PowerShell:

```bash
choco install fvm
```

Uninstall:

```bash
choco uninstall fvm
```

  </Tabs.Tab>

  <Tabs.Tab>
## Install Script (Recommended)

Install the latest version:

```bash
curl -fsSL https://fvm.app/install.sh | bash
```

Install a specific version:

```bash
curl -fsSL https://fvm.app/install.sh | bash -s <version>
```

*Replace `<version>` with your desired FVM version (e.g., `3.2.1`)*

## Alternative Installation

For alternative installation methods, see the [GitHub Releases](https://github.com/leoafarias/fvm/releases/latest) page.

</Tabs.Tab>

<Tabs.Tab>
You can also install FVM as a [pub package](https://pub.dev/packages/fvm).

<Callout type="warning">
  This is not recommended if you plan on using FVM to manage your global Flutter install.
</Callout>

```bash
dart pub global activate fvm
```

Uninstall:

```bash
dart pub global deactivate fvm
```

</Tabs.Tab>
</Tabs>

## Installation Options

### Install Script Features

The install script (`install.sh`) supports several options:

- **Latest version**: `curl -fsSL https://fvm.app/install.sh | bash`
- **Specific version**: `curl -fsSL https://fvm.app/install.sh | bash -s <version>` (replace `<version>` with desired FVM version)
- **Container/CI support**: Set `FVM_ALLOW_ROOT=true` for Docker/CI environments
- **Help**: `./install.sh --help`
- **Version info**: `./install.sh --version`

### Supported Platforms

| Platform | Architecture | Support |
|----------|-------------|---------|
| macOS | x64, arm64 | ✅ |
| Linux | x64, arm64, riscv64 | ✅ |
| Windows | x64 | ✅ (via PowerShell/Chocolatey) |

### Requirements

- **macOS/Linux**: `curl`, `tar`, and `sudo` or `doas`
- **Windows**: PowerShell (for script) or Chocolatey

## PATH Configuration

The install script automatically configures your shell PATH. For manual installations, add FVM to your PATH:

<Tabs items={['macOS/Linux (Install Script)', 'macOS/Linux (Pub)', 'Windows']}>
  <Tabs.Tab>
The install script automatically adds FVM to your PATH by updating your shell configuration:

- **Bash**: `~/.bashrc` or `~/.bash_profile`
- **Zsh**: `~/.zshrc`
- **Fish**: `~/.config/fish/config.fish`

The script adds: `export PATH="$HOME/.fvm_flutter/bin:$PATH"`

To apply changes immediately: `source ~/.zshrc` (or your shell config file)

  </Tabs.Tab>
  <Tabs.Tab>
For pub installations, add to your shell profile:

```bash
export PATH="$PATH:$HOME/.pub-cache/bin"
```

  </Tabs.Tab>
  <Tabs.Tab>
Add to your PATH environment variable:

```
%USERPROFILE%\AppData\Local\Pub\Cache\bin
```

  </Tabs.Tab>
</Tabs>

## Uninstallation

**Install Script:**
```bash
./install.sh --uninstall
```

**Homebrew:**
```bash
brew uninstall fvm
brew untap leoafarias/fvm
```

**Chocolatey:**
```bash
choco uninstall fvm
```

**Pub:**
```bash
dart pub global deactivate fvm
```

**Remove cached Flutter versions (optional):**
```bash
fvm destroy
```
